package com.mew.config;

import com.mew.provide.EventBusSubscribe;
import com.zebra.common.event.EventBusAsyncCenter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;


@Component
@Order(1)
@Slf4j
public class StartInitialize implements ApplicationRunner {

    @Autowired
    private EventBusSubscribe eventBusSubscribe;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        start();
    }

    private void start() throws Exception {
//        NicknameUtil.initializeName();
//        log.info("Start init NickName config success");

        EventBusAsyncCenter.register(eventBusSubscribe);

    }

}
